Standard switches with contacts, such as ignition locks in automobiles, are subject to wear on their contacts when used frequently, due to friction, elastic deformation, current flow and break sparks. Ignition locks generally comprise devices which detect whether an ignition key has been inserted or removed. This detection is usually made mechanically and leads to a blockage of the steering or a removal of this blockage. With regard to electronic systems present in modern automobiles, an improved drive authorisation control and the drive-by-wire systems which can be anticipated in the future, in which a mechanical steering may be omitted, it is desirable that the detection as to whether the key has been inserted or removed be conducted electronically and also without contacts.